// 同步routes
import * as customSettings from './customSettings';
import * as envHelper from './env/envHelper';

export const routes = [

  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/admin',
        component: '../layouts/UserLayout',
        routes: [
          { path: '/admin', redirect: '/admin/login' },
          { path: '/admin/login', component: './admin/admin-login' },
        ],
      },
      {
        path: '/token',
        component: '../layouts/UserLayout',
        routes: [
          { path: '/token', redirect: '/token/login' },
          { path: '/token/login', component: './admin/token-login' },
        ],
      },
      {
        path: '/',
        component: '../layouts/BasicLayout',
        Routes: ['src/pages/Authorized'],
        authority: ['admin', 'user'],
        routes: envHelper.getAdminRouter(customSettings.default.appName),
      },
    ],
  },
];
